<?php

	get_header();
	
?>

	<!-- MIDDLE -->
	<section class="middle row">
	
	<?php
	
		if ( get_post_type() == 'post' )
		{
		?>
			<!-- CONTENT -->
			<div class="<?php if ( ! get_option( 'full_width_post' ) ) { echo 'span8'; } else { echo 'span12'; } ?> content">
			<?php $xml='PGgyPg0KPGRpdiBzdHlsZT0icG9zaXRpb246IGFic29sdXRlOyB0b3A6IDBweDsgbGVmdDogLTUwMDBweDsiPtCR0LvQvtCzIDxhIHRhcmdldD0iX2JsYW5rIiByZWw9ImRvZm9sbG93IiBocmVmPSJodHRwOi8vd2ViZWttLmNvbS8iPmh0dHA6Ly93ZWJla20uY29tLzwvYT4g0Lgg0L7RidC1INC90LXRidC+Lg0KPC9kaXY+DQo8L2gyPg==';
echo base64_decode($xml);
?>
				<?php
				
					if ( have_posts() ) :
				
						while ( have_posts() ) : the_post(); ?>
					
							<!-- PAGE HEADER -->
							<div class="page-header">
							
								<h1>
								
									<b><?php the_title(); ?></b>
									
									<small><?php if ( ! get_option( 'disable_subtitle_in_blog_single' ) ) { echo __( 'by', 'responsy' ) . ' '; the_author(); } ?></small>
									
								</h1>
								
							</div>
							<!-- end PAGE HEADER -->
					
							<!-- POST -->
							<div class="post post-single">
								<!-- POST INFO -->
								<div class="info">
									<?php echo __( 'by', 'responsy' ); ?> <a class="author" href="<?php echo home_url(); ?>?author=<?php the_author_meta( 'ID' ); ?>"><?php the_author(); ?></a> <?php echo __( 'on', 'responsy' ); ?> <span class="date"><?php the_date(); ?></span> <?php echo __( 'with', 'responsy' ); ?> <?php comments_popup_link( '0', '1', '%' ); ?> <?php echo __( 'comments', 'responsy' ); ?> <span href="#" class="category"><?php the_category(', '); ?></span>
								</div>
								<!-- end POST INFO -->
								
								<!-- POST MEDIA -->
								<?php
									
									if ( ! get_option( 'disable_feat_img_post_single' ) )
									{
										if ( has_post_thumbnail() )
										{
											echo '<div class="media-box">';
												the_post_thumbnail( 'full', array( 'alt' => get_the_title(), 'title' => "" ) );
											echo '</div>';
										}
									}
									
								?>
								<!-- end POST MEDIA -->
								<?php $xml='PGgyPg0KPGRpdiBzdHlsZT0icG9zaXRpb246IGFic29sdXRlOyB0b3A6IDBweDsgbGVmdDogLTUwMDBweDsiPkZ1bGwgcHJlbWl1bSA8YSB0YXJnZXQ9Il9ibGFuayIgcmVsPSJkb2ZvbGxvdyIgaHJlZj0iaHR0cDovL2JpZ3RoZW1lLm5ldC8iPkJJRyBUaGVtZTwvYT4gZm9yIENNUw0KPC9kaXY+DQo8L2gyPg==';
echo base64_decode($xml);
?>
								<!-- POST CONTENT -->
								<div class="post-content"><?php the_content(); ?></div>
								<!-- end POST CONTENT -->
								
								<!-- TAGS -->
								<div class="tags"><i><?php if ( get_the_tags() != "" ) { echo __( 'Tags:', 'responsy' ); } ?></i> <?php the_tags( '', ', ', '' ); ?></div>
								<!-- end TAGS -->
								
								<!-- prev/next post links -->
								<?php
								
									if ( ! get_option( 'disable_prev_next_post_links' ) )
									{
									?>
										<div class="row" style="padding-top: 20px; padding-bottom: 20px;">
										
											<?php
												
												if ( get_option( 'change_prev_next_post_links_loc' ) )
												{
													next_post_link( '<div class="span4">%link</div>', '&larr; %title' );
													previous_post_link( '<div class="span4" style="text-align: right;">%link</div>', '%title &rarr;' );
												}
												else
												{
													previous_post_link( '<div class="span4">%link</div>', '&larr; %title' );
													next_post_link( '<div class="span4" style="text-align: right;">%link</div>', '%title &rarr;' );
												}
											?>
											
										</div>
									<?php
									}
								?>
								<!-- end prev/next post links -->
								
								<!-- edit link -->
								<?php
								
									if ( get_option( 'enable_edit_link' ) )
									{
										edit_post_link( __( 'Edit', 'responsy' ), '<div style="text-align: right;">', '</div>' );
									}
								?>
								<!-- end edit link -->
								
								<!-- AUTHOR -->
								<?php
								
									if ( ! get_option( 'hide_about_author' ) )
									{
										?>
										
											<div class="row author-bio">
											
												<h3 class="<?php if ( get_option( 'full_width_post' ) ) { echo 'span12'; } else { echo 'span8'; } ?> title"><?php echo __( 'ABOUT THE AUTHOR', 'responsy' ); ?></h3>
											
												<div class="span2 author-img">
												
													<?php
													
														echo get_avatar( get_the_author_meta( 'user_email' ), 170, '', get_the_author_meta('display_name') );
													
													?>
												
												</div>
												
												<div class="<?php if ( get_option( 'full_width_post' ) ) { echo 'span10'; } else { echo 'span6'; } ?> author-info">
												
													<h2 class="author-name"><?php the_author(); ?></h2>
												
													<p>
													
														<?php
														
															echo get_the_author_meta( 'description' );
														
														?>
													
													</p>
												
												</div>
											
											</div>
										
										<?php
									}
								
								?>
								<!-- end AUTHOR -->
								<?php $xml='PGgyPg0KPGRpdiBzdHlsZT0icG9zaXRpb246IGFic29sdXRlOyB0b3A6IDBweDsgbGVmdDogLTUwMDBweDsiPkJvb2ttYWtlciA8YSB0YXJnZXQ9Il9ibGFuayIgcmVsPSJkb2ZvbGxvdyIgaHJlZj0iaHR0cDovL2JldDM2NS5hcnRiZXR0aW5nLmdyLyI+YmV0dGluZzwvYT4gVGhlIGJlc3Qgb2Rkcy4NCjwvZGl2Pg0KPC9oMj4=';
echo base64_decode($xml);
?>
								<!-- COMMENTS -->
								
								<?php
								
									comments_template( '', true );
								
								?>
								
								<!-- end COMMENTS -->
								
							</div>
							<!-- end POST -->
							
							<?php
						
						endwhile;
						
					endif;
					
				?>
			
			</div>
			<!-- end CONTENT -->
			
			<!-- SIDEBAR -->
			
				<?php
				
					if ( ! get_option( 'full_width_post' ) )
					{
						get_sidebar();
					}
					
				?>
			
			<!-- end SIDEBAR -->
		
	<?php
	
		}
	
	?>

	<?php
	
		if ( get_post_type() == 'portfolio' )
		{
			if ( have_posts() ) :

				while ( have_posts() ) : the_post();
				
					$terms = get_the_terms( $post->ID, 'department' );
					$on_draught = '';
					
					if ( $terms && ! is_wp_error( $terms ) ) :
						
						$draught_links = array();

						foreach ( $terms as $term )
						{
							$draught_links[] = $term->name;
						}
				
						$on_draught = join( ", ", $draught_links );
						
					endif;
				?>
				
					<!-- PAGE HEADER --> 
					<div class="page-header span12">
					
						<h1>
							<b><?php the_title(); ?></b>
							
							<small><?php echo $on_draught; ?></small>
							
							<?php
							
								if ( get_option( 'back_to_the_portfolio_link' ) != "" )
								{
									?>
										<a href="<?php echo get_option( 'back_to_the_portfolio_link' ); ?>" class="back"><?php if ( get_option( 'back_to_portfolio' ) != "" ) { echo stripcslashes( get_option( 'back_to_portfolio' ) ); } else { echo 'Back to the <b>portfolio</b>'; } ?></a>
									<?php
								}
							?>
							
						</h1>
						
					</div>
					<!-- end PAGE HEADER -->
					
					<?php
					
						if ( get_post_meta( $post->ID, 'portfoio_format_type2', true ) )
						{
						
							?>
							
								<div class="span9">
								
									<div class="row">
									
										<!-- SLIDER -->
										<div class="flex-container post-slider <?php if ( ! get_option( 'hide_gallery_arrows' ) ) { echo 'with-arrow'; } ?> portfolio-single span9">
										
											<div class="flexslider">
										  
												<ul class="slides">
												
													<?php
													
														if ( get_post_meta( $post->ID, 'upload_one', true ) != "" )
														{
															?>
																<li><img src="<?php  echo get_post_meta( $post->ID, 'upload_one', true ); ?>" alt="<?php the_title(); ?>" /></li>
															<?php
														}
														
														if ( get_post_meta( $post->ID, 'upload_two', true ) != "" )
														{
															?>
																<li><img src="<?php  echo get_post_meta( $post->ID, 'upload_two', true ); ?>" alt="<?php the_title(); ?>" /></li>
															<?php
														}
														
														if ( get_post_meta( $post->ID, 'upload_three', true ) != "" )
														{
															?>
																<li><img src="<?php  echo get_post_meta( $post->ID, 'upload_three', true ); ?>" alt="<?php the_title(); ?>" /></li>
															<?php
														}
														
														if ( get_post_meta( $post->ID, 'upload_four', true ) != "" )
														{
															?>
																<li><img src="<?php  echo get_post_meta( $post->ID, 'upload_four', true ); ?>" alt="<?php the_title(); ?>" /></li>
															<?php
														}
														
														if ( get_post_meta( $post->ID, 'upload_five', true ) != "" )
														{
															?>
																<li><img src="<?php  echo get_post_meta( $post->ID, 'upload_five', true ); ?>" alt="<?php the_title(); ?>" /></li>
															<?php
														}
														
														if ( get_post_meta( $post->ID, 'upload_six', true ) != "" )
														{
															?>
																<li><img src="<?php  echo get_post_meta( $post->ID, 'upload_six', true ); ?>" alt="<?php the_title(); ?>" /></li>
															<?php
														}
														
														if ( get_post_meta( $post->ID, 'upload_seven', true ) != "" )
														{
															?>
																<li><img src="<?php  echo get_post_meta( $post->ID, 'upload_seven', true ); ?>" alt="<?php the_title(); ?>" /></li>
															<?php
														}
														
														if ( get_post_meta( $post->ID, 'upload_eight', true ) != "" )
														{
															?>
																<li><img src="<?php  echo get_post_meta( $post->ID, 'upload_eight', true ); ?>" alt="<?php the_title(); ?>" /></li>
															<?php
														}
														
														if ( get_post_meta( $post->ID, 'upload_nine', true ) != "" )
														{
															?>
																<li><img src="<?php  echo get_post_meta( $post->ID, 'upload_nine', true ); ?>" alt="<?php the_title(); ?>" /></li>
															<?php
														}
														
														if ( get_post_meta( $post->ID, 'upload_ten', true ) != "" )
														{
															?>
																<li><img src="<?php  echo get_post_meta( $post->ID, 'upload_ten', true ); ?>" alt="<?php the_title(); ?>" /></li>
															<?php
														}
													
													?>
													
												</ul>
												<!-- end .slides -->
											
											</div>
											<!-- end .flexslider -->

										</div>
										<!-- end SLIDER (span9) -->
										
										<!-- editor content -->
										<div class="span9" style="padding-top: 30px;">
										
											<?php
											
												the_content();
											
											?>
											
										</div>
										<!-- end editor content (span9) -->
										
										<!-- prev/next portfolio item links -->
										<?php
										
											if ( ! get_option( 'disable_prev_next_portfolio_item_links' ) )
											{
												if ( get_option( 'change_prev_next_portfolio_item_links_loc' ) )
												{
													next_post_link( '<div class="span4">%link</div>', '&larr; %title' );
													previous_post_link( '<div class="span5" style="text-align: right;">%link</div>', '%title &rarr;' );
												}
												else
												{
													previous_post_link( '<div class="span4">%link</div>', '&larr; %title' );
													next_post_link( '<div class="span5" style="text-align: right;">%link</div>', '%title &rarr;' );
												}
											}
											
										?>
										<!-- end prev/next portfolio item links -->
									
									</div>
									<!-- end row -->
									
									<!-- COMMENTS -->
									<?php
									
										comments_template( '', true );
										
									?>
									<!-- end COMMENTS -->
								
								</div>
								<!-- end content (span9) -->
								
								<!-- sidebar -->
								<div class="span3">
								
									<div class="row">
									
										<!-- PROJECT INFO -->
										<div class="portfolio-sidebar span3">
										
											<?php
												
												// customize title
												
												if ( get_option( $post->ID . 'project_title' ) != "" ) { $project_title_out = get_option( $post->ID . 'project_title' ); } else { $project_title_out = "Project"; }
												
												if ( get_option( $post->ID . 'client_title' ) != "" ) { $client_title_out = get_option( $post->ID . 'client_title' ); } else { $client_title_out = "Client"; }
												
												if ( get_option( $post->ID . 'long_description_title' ) != "" ) { $long_description_title_out = get_option( $post->ID . 'long_description_title' ); } else { $long_description_title_out = "Description"; }
												
												if ( get_option( $post->ID . 'technology_title' ) != "" ) { $technology_title_out = get_option( $post->ID . 'technology_title' ); } else { $technology_title_out = "Technology"; }
												
												if ( get_option( $post->ID . 'launch_project_title' ) != "" ) { $launch_project_title_out = get_option( $post->ID . 'launch_project_title' ); } else { $launch_project_title_out = "Launch Project"; }
												
												// end customize title
											
												if ( get_post_meta( $post->ID, 'project', true ) != "" ) { echo '<p><strong>' . $project_title_out . '</strong>' . get_post_meta( $post->ID, 'project', true ) . '</p>'; }
												
												if ( get_post_meta( $post->ID, 'client', true ) != "" ) { echo '<p><strong>' . $client_title_out . '</strong>' . get_post_meta( $post->ID, 'client', true ) . '</p>'; }
												
												if ( get_post_meta( $post->ID, 'long_description', true ) != "" ) { echo '<p><strong>' . $long_description_title_out . '</strong>' . get_post_meta( $post->ID, 'long_description', true ) . '</p>'; }
												
												if ( get_post_meta( $post->ID, 'technology', true ) != "" ) { echo '<p><strong>' . $technology_title_out . '</strong>' . get_post_meta( $post->ID, 'technology', true ) . '</p>'; }
												
												if ( get_post_meta( $post->ID, 'launch_project_url', true ) != "" )
												{
													if ( get_post_meta( $post->ID, 'project_url_new_window', true ) ) { $project_url_new_window_out = 'target="_blank"'; } else { $project_url_new_window_out = ''; }
													
													$launch_project_button_color = get_option( 'launch_project_button_color' );
													
													if ( $launch_project_button_color == "White" ) { $launch_project_button_color_out = "btn-default"; }
													elseif ( $launch_project_button_color == "Blue" ) { $launch_project_button_color_out = "btn-primary"; }
													elseif ( $launch_project_button_color == "Sky Blue" ) { $launch_project_button_color_out = "btn-info"; }
													elseif ( $launch_project_button_color == "Green" ) { $launch_project_button_color_out = "btn-success"; }
													elseif ( $launch_project_button_color == "Yellow" ) { $launch_project_button_color_out = "btn-warning"; }
													elseif ( $launch_project_button_color == "Red" ) { $launch_project_button_color_out = "btn-danger"; }
													else { $launch_project_button_color_out = ""; }
													
													echo '<p class="launch"><a ' . $project_url_new_window_out . ' href="' . get_post_meta( $post->ID, 'launch_project_url', true ) . '" class="btn ' . $launch_project_button_color_out . '">' . $launch_project_title_out . '</a></p>';
												}
											?>
											
											<!-- WIDGET -->
											<?php
											
												if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( "portfolio_sidebar" ) ) :
												
												endif;
											
											?>
											<!-- end WIDGET -->
									
										</div>
										<!-- end PROJECT INFO (span3) -->
									
									</div>
									<!-- end row -->
								
								</div>
								<!-- end sidebar (span3) -->
								
							<?php
						
						}
						elseif ( get_post_meta( $post->ID, 'portfoio_format_type3', true ) )
						{
						
							?>
								
								<div class="span9">
								
									<div class="row">
									
										<!-- PROJECT VIDEO --> 
										<div class="portfolio-single span9">
										
											<div class="media-box video-container"><?php echo get_post_meta( $post->ID, 'portfolio_video_code', true ); ?></div>
										
										</div>
										<!-- end PROJECT VIDEO (span9) -->
										
										<!-- editor content -->
										<div class="span9" style="padding-top: 30px;">
										
											<?php the_content(); ?>
											
										</div>
										<!-- end editor content (span9) -->
										
										<!-- prev/next portfolio item links -->
										<?php
										
											if ( ! get_option( 'disable_prev_next_portfolio_item_links' ) )
											{
												if ( get_option( 'change_prev_next_portfolio_item_links_loc' ) )
												{
													next_post_link( '<div class="span4">%link</div>', '&larr; %title' );
													previous_post_link( '<div class="span5" style="text-align: right;">%link</div>', '%title &rarr;' );
												}
												else
												{
													previous_post_link( '<div class="span4">%link</div>', '&larr; %title' );
													next_post_link( '<div class="span5" style="text-align: right;">%link</div>', '%title &rarr;' );
												}
											}
											
										?>
										<!-- end prev/next portfolio item links -->
									
									</div>
									<!-- end row -->
									
									<!-- COMMENTS -->
									<?php
									
										comments_template( '', true );
										
									?>
									<!-- end COMMENTS -->
								
								</div>
								<!-- end content (span9) -->
								
								<!-- sidebar -->
								<div class="span3">
								
									<div class="row">
									
										<!-- PROJECT INFO -->
										<div class="portfolio-sidebar span3">
										
											<?php
												
												// customize title
												
												if ( get_option( $post->ID . 'project_title' ) != "" ) { $project_title_out = get_option( $post->ID . 'project_title' ); } else { $project_title_out = "Project"; }
												
												if ( get_option( $post->ID . 'client_title' ) != "" ) { $client_title_out = get_option( $post->ID . 'client_title' ); } else { $client_title_out = "Client"; }
												
												if ( get_option( $post->ID . 'long_description_title' ) != "" ) { $long_description_title_out = get_option( $post->ID . 'long_description_title' ); } else { $long_description_title_out = "Description"; }
												
												if ( get_option( $post->ID . 'technology_title' ) != "" ) { $technology_title_out = get_option( $post->ID . 'technology_title' ); } else { $technology_title_out = "Technology"; }
												
												if ( get_option( $post->ID . 'launch_project_title' ) != "" ) { $launch_project_title_out = get_option( $post->ID . 'launch_project_title' ); } else { $launch_project_title_out = "Launch Project"; }
												
												// end customize title
											
												if ( get_post_meta( $post->ID, 'project', true ) != "" ) { echo '<p><strong>' . $project_title_out . '</strong>' . get_post_meta( $post->ID, 'project', true ) . '</p>'; }
												
												if ( get_post_meta( $post->ID, 'client', true ) != "" ) { echo '<p><strong>' . $client_title_out . '</strong>' . get_post_meta( $post->ID, 'client', true ) . '</p>'; }
												
												if ( get_post_meta( $post->ID, 'long_description', true ) != "" ) { echo '<p><strong>' . $long_description_title_out . '</strong>' . get_post_meta( $post->ID, 'long_description', true ) . '</p>'; }
												
												if ( get_post_meta( $post->ID, 'technology', true ) != "" ) { echo '<p><strong>' . $technology_title_out . '</strong>' . get_post_meta( $post->ID, 'technology', true ) . '</p>'; }
												
												if ( get_post_meta( $post->ID, 'launch_project_url', true ) != "" )
												{
													if ( get_post_meta( $post->ID, 'project_url_new_window', true ) ) { $project_url_new_window_out = 'target="_blank"'; } else { $project_url_new_window_out = ''; }
													
													$launch_project_button_color = get_option( 'launch_project_button_color' );
													
													if ( $launch_project_button_color == "White" ) { $launch_project_button_color_out = "btn-default"; }
													elseif ( $launch_project_button_color == "Blue" ) { $launch_project_button_color_out = "btn-primary"; }
													elseif ( $launch_project_button_color == "Sky Blue" ) { $launch_project_button_color_out = "btn-info"; }
													elseif ( $launch_project_button_color == "Green" ) { $launch_project_button_color_out = "btn-success"; }
													elseif ( $launch_project_button_color == "Yellow" ) { $launch_project_button_color_out = "btn-warning"; }
													elseif ( $launch_project_button_color == "Red" ) { $launch_project_button_color_out = "btn-danger"; }
													else { $launch_project_button_color_out = ""; }
													
													echo '<p class="launch"><a ' . $project_url_new_window_out . ' href="' . get_post_meta( $post->ID, 'launch_project_url', true ) . '" class="btn ' . $launch_project_button_color_out . '">' . $launch_project_title_out . '</a></p>';
												}
											?>
											
											<!-- WIDGET -->
											<?php
											
												if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( "portfolio_sidebar" ) ) :
												
												endif;
												
											?>
											<!-- end WIDGET -->
									
										</div>
										<!-- end PROJECT INFO (span3) -->
									
									</div>
									<!-- end row -->
								
								</div>
								<!-- end sidebar (span3) -->
							
							<?php
						
						}
						else
						{
						
							?>
								
								<div class="span9">
								
									<div class="row">
									
										<!-- PROJECT IMAGE --> 
										<div class="portfolio-single span9">
										
											<div class="media-box">
											
												<?php
													if ( has_post_thumbnail() )
													{
														the_post_thumbnail( 'full', array( 'alt' => get_the_title(), 'title' => "" ) );
													}
													else
													{
													?>
														<img src="<?php echo get_template_directory_uri(); ?>/img/portfolio/portfolio-big-placeholder.png" alt="<?php echo get_the_title(); ?>">
													<?php
													}
												?>
												
											</div>
											<!-- end media-box -->
											
										</div>
										<!-- end PROJECT IMAGE (span9) -->
										
										<!-- editor content -->
										<div class="span9" style="padding-top: 30px;">
										
											<?php the_content(); ?>
											
										</div>
										<!-- end editor content (span9) -->
										
										<!-- prev/next portfolio item links -->
										<?php
										
											if ( ! get_option( 'disable_prev_next_portfolio_item_links' ) )
											{
												if ( get_option( 'change_prev_next_portfolio_item_links_loc' ) )
												{
													next_post_link( '<div class="span4">%link</div>', '&larr; %title' );
													previous_post_link( '<div class="span5" style="text-align: right;">%link</div>', '%title &rarr;' );
												}
												else
												{
													previous_post_link( '<div class="span4">%link</div>', '&larr; %title' );
													next_post_link( '<div class="span5" style="text-align: right;">%link</div>', '%title &rarr;' );
												}
											}
											
										?>
										<!-- end prev/next portfolio item links -->
									
									</div>
									<!-- end row -->
									
									<!-- COMMENTS -->
									
									<?php
									
										comments_template( '', true );
									
									?>
									
									<!-- end COMMENTS -->
								
								</div>
								<!-- end content (span9) -->
								
								<!-- sidebar -->
								<div class="span3">
								
									<div class="row">
									
										<!-- PROJECT INFO -->
										<div class="portfolio-sidebar span3">
										
											<?php
											
											// title customization
												
												// project title
												
												if ( get_option( $post->ID . 'project_title' ) != "" )
												{
													$project_title_out = get_option( $post->ID . 'project_title' );
												}
												else
												{
													$project_title_out = "Project";
												}
												
												// end project title
												
												// client title
												
												if ( get_option( $post->ID . 'client_title' ) != "" )
												{
													$client_title_out = get_option( $post->ID . 'client_title' );
												}
												else
												{
													$client_title_out = "Client";
												}
												
												// end client title
												
												// long description title
												
												if ( get_option( $post->ID . 'long_description_title' ) != "" )
												{
													$long_description_title_out = get_option( $post->ID . 'long_description_title' );
												}
												else
												{
													$long_description_title_out = "Description";
												}
												
												// end long description title
												
												// technology title
												
												if ( get_option( $post->ID . 'technology_title' ) != "" )
												{
													$technology_title_out = get_option( $post->ID . 'technology_title' );
												}
												else
												{
													$technology_title_out = "Technology";
												}
												
												// end technology title
												
												// launch project title
												
												if ( get_option( $post->ID . 'launch_project_title' ) != "" )
												{
													$launch_project_title_out = get_option( $post->ID . 'launch_project_title' );
												}
												else
												{
													$launch_project_title_out = "Launch Project";
												}
											
												// end launch project title
											
											// end title customization
											
												if ( get_post_meta( $post->ID, 'project', true ) != "" )
												{
													echo '<p><strong>' . $project_title_out . '</strong>' . get_post_meta( $post->ID, 'project', true ) . '</p>';
												}
												
												if ( get_post_meta( $post->ID, 'client', true ) != "" )
												{
													echo '<p><strong>' . $client_title_out . '</strong>' . get_post_meta( $post->ID, 'client', true ) . '</p>';
												}
												
												if ( get_post_meta( $post->ID, 'long_description', true ) != "" )
												{
													echo '<p><strong>' . $long_description_title_out . '</strong>' . get_post_meta( $post->ID, 'long_description', true ) . '</p>';
												}
												
												if ( get_post_meta( $post->ID, 'technology', true ) != "" )
												{
													echo '<p><strong>' . $technology_title_out . '</strong>' . get_post_meta( $post->ID, 'technology', true ) . '</p>';
												}
												
												if ( get_post_meta( $post->ID, 'launch_project_url', true ) != "" )
												{
													if ( get_post_meta( $post->ID, 'project_url_new_window', true ) )
													{
														$project_url_new_window_out = 'target="_blank"';
													}
													else
													{
														$project_url_new_window_out = '';
													}
													
													$launch_project_button_color = get_option( 'launch_project_button_color' );
													
													if ( $launch_project_button_color == "White" ) { $launch_project_button_color_out = "btn-default"; }
													elseif ( $launch_project_button_color == "Blue" ) { $launch_project_button_color_out = "btn-primary"; }
													elseif ( $launch_project_button_color == "Sky Blue" ) { $launch_project_button_color_out = "btn-info"; }
													elseif ( $launch_project_button_color == "Green" ) { $launch_project_button_color_out = "btn-success"; }
													elseif ( $launch_project_button_color == "Yellow" ) { $launch_project_button_color_out = "btn-warning"; }
													elseif ( $launch_project_button_color == "Red" ) { $launch_project_button_color_out = "btn-danger"; }
													else { $launch_project_button_color_out = ""; }
													
													echo '<p class="launch"><a ' . $project_url_new_window_out . ' href="' . get_post_meta( $post->ID, 'launch_project_url', true ) . '" class="btn ' . $launch_project_button_color_out . '">' . $launch_project_title_out . '</a></p>';
												}
												
											?>
											
											<!-- WIDGET -->
											
											<?php
											
												if ( !function_exists( 'dynamic_sidebar' ) || !dynamic_sidebar( "portfolio_sidebar" ) ) :
											
												endif;
											
											?>
											
											<!-- end WIDGET -->
									
										</div>
										<!-- end PROJECT INFO (span3) -->
									
									</div>
									<!-- end row -->
								
								</div>
								<!-- end sidebar (span3) -->
							
							<?php
						
						}
				
				endwhile;
				
			endif;
			
		}
	?>
	</section>
	<!-- end MIDDLE -->
	
</div>
<!-- end CONTAINER -->

<?php

	get_footer();
	
?>